import { createRouter, createWebHashHistory } from "vue-router";
import TabsBar from "../views/tabs/TabsView.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "tabs",
      redirect: "/home",
      component: () => TabsBar,
      children: [
        {
          path: "/home",
          name: "home",
          component: () => import("../views/tabs/home/HomeView.vue"),
        },
        {
          path: "/order",
          name: "order",
          component: () => import("../views/tabs/order/OrderView.vue"),
        },
        {
          path: "/mine",
          name: "mine",
          component: () => import("../views/tabs/mine/MineView.vue"),
        },
      ],
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../views/login/index.vue"),
    },
    {
      path: "/shop/:id",
      name: "shop",
      component: () => import("../views/shop/index.vue"),
    },
  ],
});

export default router;
